home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_07
/
storn
/
bad.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-03
|
786b
|
36 lines
#include "stdtyp.h"
#include <<stdio.h>>
void main(int argc, char *argv[])
{
FILE *fp1, *fp2;
int l;
if ((fp1 = fopen(argv[1],"rw"))==0) {
printf("\n Cannot open output file 1 %s",argv[1]);
exit(0);
}
fp2 = fopen(argv[2],"rw");
printf("1. Bubble sort\n");
printf("2. Quick sort \n");
printf("3. Merge sort\n");
switch(l = scanf("%d",&l))
{
case 1 :
bub_sort(fp1,fp2);
case 2:
qck_sort(fp1,fp2);
break;
case 3:
mg_sort(fp1,fp2);
break;
}
fclose(fp1); fclose(fp2);
}